package day06;

public class TestMethod {
    public static void main(String[] args) {
        say();
        sayHi("古天乐");
        sayHello("渣渣辉",18);
        double a = getNum();
        System.out.println(a);
        int b = plus(5,8);
        System.out.println(b);
        int x = 6,y=10;
        int z =plus(x,y);
        System.out.println(z);
        int[]d = testArray();
        System.out.println(d.length);
        for (int i = 0;i<d.length;i++){
            System.out.println(d[i]);
        }
    }
    public static void say(){
        System.out.println("大家好，我系渣渣辉");
    }
    public static void sayHi(String name){
        System.out.println("大家好，我系渣渣辉");
    }
    public static void sayHello(String name,int age){
        System.out.println("大家好，我系"+name+",今年"+age+"岁！");
    }
    public static double getNum(){
        return 18.6;
    }
    public static  int plus(int num1, int num2){
        int num=num1+num2;
        return num;
    }
    public static  int[] testArray(){
        int arr[] =new int[10];
        for (int i=0;i<arr.length;i++){
            arr[i]=(int)(Math.random()*100);
        }
        return arr;
    }
}
